6.5 Expected Value and Variance of a Function of X

随机变量函数的期望值和方差

6.5.1 函数期望值的基本概念 / Basic Concepts of Function Expected Value

如果X是离散随机变量,g是函数,那么g(X)也是离散随机变量。您可以使用以下公式计算g(X)的期望值:

If X is a discrete random variable, and g is a function, then g(X) is also a discrete random variable. You can calculate the expected value of g(X) using the formula:

函数期望值公式 / Function Expected Value Formula

\[E(g(X)) = \sum g(x) P(X = x)\]

这是E(X²)公式的更一般形式。

This is a more general version of the formula for E(X²).

对于简单函数,如加法和乘以常数,您可以学习以下规则:

For simple functions, such as addition and multiplication by a constant, you can learn the following rules:

线性变换规则 / Linear Transformation Rules

如果X是随机变量,a和b是常数,则:

\[E(aX + b) = aE(X) + b\]

If X is a random variable and a and b are constants, then:

\[E(aX + b) = aE(X) + b\]

随机变量和的期望值 / Expected Value of Sum of Random Variables

如果X和Y是随机变量,则:

\[E(X + Y) = E(X) + E(Y)\]

If X and Y are random variables, then:

\[E(X + Y) = E(X) + E(Y)\]

6.5.2 方差变换规则 / Variance Transformation Rules

您可以使用类似的规则来简化某些随机变量函数的方差计算:

You can use a similar rule to simplify variance calculations for some functions of random variables:

线性变换方差公式 / Linear Transformation Variance Formula

如果X是随机变量,a和b是常数,则:

\[Var(aX + b) = a^2 Var(X)\]

If X is a random variable and a and b are constants, then:

\[Var(aX + b) = a^2 Var(X)\]

重要提示 / Important Note

注意常数项不影响方差,只有系数a会影响方差的大小。

Note that constant terms do not affect variance, only the coefficient a affects the magnitude of variance.

6.5.3 例题解析 / Example Problems

例11:线性变换 / Example 11: Linear Transformation

离散随机变量X具有概率分布:

A discrete random variable X has the probability distribution:

x 1 2 3 4
P(X = x) \(\frac{12}{25}\) \(\frac{6}{25}\) \(\frac{4}{25}\) \(\frac{3}{25}\)

a) 写出Y的概率分布,其中Y = 2X + 1

a) Write down the probability distribution for Y, where Y = 2X + 1

b) 求E(Y)

b) Find E(Y)

c) 计算E(X)并验证E(Y) = 2E(X) + 1

c) Compute E(X) and verify that E(Y) = 2E(X) + 1

解答 / Solution:

a) Y的概率分布:

a) The probability distribution for Y is:

x 1 2 3 4
y = 2x + 1 3 5 7 9
P(Y = y) \(\frac{12}{25}\) \(\frac{6}{25}\) \(\frac{4}{25}\) \(\frac{3}{25}\)

当x = 1时,y = 2×1 + 1 = 3;当x = 2时,y = 2×2 + 1 = 5,等等。

When x = 1, y = 2×1 + 1 = 3; when x = 2, y = 2×2 + 1 = 5, etc.

注意与X相关的概率仍然被使用,例如P(X = 3) = P(Y = 7)。

Notice how the probabilities relating to X are still being used, for example, P(X = 3) = P(Y = 7).

b) E(Y) = ΣyP(Y = y)

b) E(Y) = ΣyP(Y = y)

= 3×(12/25) + 5×(6/25) + 7×(4/25) + 9×(3/25)

= (36/25) + (30/25) + (28/25) + (27/25)

= 121/25 = 4.84

c) E(X) = ΣxP(X = x) = 1×(12/25) + 2×(6/25) + 3×(4/25) + 4×(3/25)

c) E(X) = ΣxP(X = x) = 1×(12/25) + 2×(6/25) + 3×(4/25) + 4×(3/25)

= (12/25) + (12/25) + (12/25) + (12/25) = 48/25 = 1.92

因此,2E(X) + 1 = 2×1.92 + 1 = 4.84

Therefore, 2E(X) + 1 = 2×1.92 + 1 = 4.84

这确认了E(Y) = 2E(X) + 1

This confirms that E(Y) = 2E(X) + 1

例12:使用已知统计量 / Example 12: Using Known Statistics

随机变量X有E(X) = 4和Var(X) = 3。求:

A random variable X has E(X) = 4 and Var(X) = 3. Find:

a) E(3X) b) E(X - 2)

c) Var(3X) d) Var(X - 2)

e) E(X²)

解答 / Solution:

a) E(3X) = 3E(X) = 3×4 = 12

a) E(3X) = 3E(X) = 3×4 = 12

b) E(X - 2) = E(X) - 2 = 4 - 2 = 2

b) E(X - 2) = E(X) - 2 = 4 - 2 = 2

c) Var(3X) = 3²Var(X) = 9×3 = 27

c) Var(3X) = 3²Var(X) = 9×3 = 27

d) Var(X - 2) = Var(X) = 3

d) Var(X - 2) = Var(X) = 3

e) E(X²) = Var(X) + [E(X)]² = 3 + 4² = 19

e) E(X²) = Var(X) + [E(X)]² = 3 + 4² = 19

重新排列Var(X) = E(X²) - [E(X)]²得到E(X²) = Var(X) + [E(X)]²

Rearrange Var(X) = E(X²) - [E(X)]² to get E(X²) = Var(X) + [E(X)]²

6.5.4 复合函数例子 / Composite Function Examples

例13:硬币投掷问题 / Example 13: Coin Tossing Problem

投掷两枚公平的10分硬币。随机变量X(分)表示正面朝上的硬币总价值。

Two fair 10-cent coins are tossed. The random variable X cents represents the total value of the coins that land heads up.

a) 求E(X)和Var(X)。

a) Find E(X) and Var(X).

随机变量S和T定义如下:

The random variables S and T are defined as follows:

\[S = X - 10 \text{ and } T = \frac{1}{2}X - 5\]

b) 证明E(S) = E(T)。

b) Show that E(S) = E(T).

c) 求Var(S)和Var(T)。

c) Find Var(S) and Var(T).

d) 对大量S和T观测值的可能差异或相似性进行评论。

d) Comment on any likely differences or similarities.

解答 / Solution:

a) X的概率分布:

a) The probability distribution of X is:

x 0 10 20
P(X = x) \(\frac{1}{4}\) \(\frac{1}{2}\) \(\frac{1}{4}\)

E(X) = 10(通过观察)

E(X) = 10 (by inspection)

Var(X) = E(X²) - [E(X)]²

Var(X) = E(X²) - [E(X)]²

= 0²×(1/4) + 10²×(1/2) + 20²×(1/4) - 10²

= 0 + 50 + 100 - 100 = 50

b) E(S) = E(X - 10) = E(X) - 10 = 10 - 10 = 0

b) E(S) = E(X - 10) = E(X) - 10 = 10 - 10 = 0

E(T) = E(½X - 5) = ½E(X) - 5 = ½×10 - 5 = 0

E(T) = E(½X - 5) = ½E(X) - 5 = ½×10 - 5 = 0

c) Var(S) = Var(X) = 50

c) Var(S) = Var(X) = 50

Var(T) = (½)²Var(X) = 50/4 = 12.5

Var(T) = (½)²Var(X) = 50/4 = 12.5

d) 两组观测值的均值都应该接近零。S的观测值将比T的观测值更加分散。

d) The means of both sets of observations should be close to zero. The observed values of S will be more spread out than the observed values of T.

例14:三角函数 / Example 14: Trigonometric Functions

随机变量X具有以下概率分布:

The random variable X has the following probability distribution:

x 30° 60° 90°
P(X = x) 0.4 0.2 0.1 0.3

计算E(sin X)。

Calculate E(sin X).

解答 / Solution:

sin X的分布:

The distribution of sin X is:

sin x 0 \(\frac{1}{2}\) \(\frac{\sqrt{3}}{2}\) 1
P(X = x) 0.4 0.2 0.1 0.3

E(sin X) = Σsin x P(X = x)

E(sin X) = Σsin x P(X = x)

= 0×0.4 + (1/2)×0.2 + (√3/2)×0.1 + 1×0.3

= 0 + 0.1 + 0.05√3 + 0.3

= 0.4 + 0.05√3

= (8 + √3)/20 ≈ 0.487